{template 'header', 'member'}
<script>menuChanger('menu_cooper')</script>
<div class="menus">
	<table cellpadding="0" cellspacing="0">
		<tr>
			<td class="tab" id="add"><a href="{url('member/my')}?mid={$mid}&action=add"><span>申请合作</span></a></td>
		{if $_userid}
			<td class="tab_nav">&nbsp;</td>
			<td class="tab" id="s3"><a href="{url('member/my')}?mid={$mid}"><span>已通过<span class="px10">({$nums[3]})</span></span></a></td>
			<td class="tab_nav">&nbsp;</td>
			<td class="tab" id="s2"><a href="{url('member/my')}?mid={$mid}&status=2"><span>审核中<span class="px10">({$nums[2]})</span></span></a></td>
			<td class="tab_nav">&nbsp;</td>
			<td class="tab" id="s1"><a href="{url('member/my')}?mid={$mid}&status=1"><span>未通过<span class="px10">({$nums[1]})</span></span></a></td>
			<td class="tab_nav">&nbsp;</td>
			<td class="tab" id="s4"><a href="{url('member/my')}?mid={$mid}&status=4"><span>已过期<span class="px10">({$nums[4]})</span></span></a></td>
		{/if}
		</tr>
	</table>
</div>
{if $action=='add' || $action=='edit'}
<iframe src="" name="send" id="send" style="display:none;"></iframe>
<form method="post" action="{url('member/my')}" id="dform" target="send" >
	<input type="hidden" name="action" value="{$action}"/>
	<input type="hidden" name="mid" value="{$mid}"/>
	<input type="hidden" name="itemid" value="{$itemid}"/>
	<input type="hidden" name="forward" value="{$forward}"/>
	<table class="data-form">
		{if $status==1 && $action=='edit' && $note}
			<tr>
				<th width="90">未通过原因</th>
				<td class="tr f_blue">{$note}</td>
			</tr>
		{/if}
		<tr>
			<th width="90"><span class="cred">*</span> 标题</th>
			<td class="tr"><input name="post[title]" type="text" id="title" size="50" datatype="*2-999" nullmsg="请填写标题" errormsg="最少输入2个字符"  value="{$title}"/> <span id="dtitle" class="cred"></span></td>
		</tr>
		<tr>
			<th width="90"><span class="cred">*</span> 合作类型</th>
			<td class="tr">{Post::catTree('post[catid]', $moduleid, '选择分类' ,$catid, 'datatype="n" nullmsg="请选择分类"')} <span id="dcatid" class="cred"></span></td>
		</tr>
		<tr>
			<th width="90">详细说明</th>
			<td class="tr f_gray">
				{Post::kindEditor('post[content]', $moduleid, $content, 'datatype="*5-99999" nullmsg="请填写详细说明" errormsg="详细说明最少5字"','675px')}
			</td>
		</tr>
		{if $need_question}
			<tr>
				<th width="90"><span class="cred">*</span> 验证问题</th>
				<td class="tr">{template 'question', 'chip'} <span id="danswer" class="cred"></span></td>
			</tr>
		{/if}
		{if $need_captcha}
			<tr>
				<th width="90"><span class="cred">*</span> 验证码</th>
				<td class="tr">{template 'captcha', 'chip'} <span id="dcaptcha" class="cred"></span></td>
			</tr>
		{/if}
		<tr>
			<th width="90">&nbsp;</th>
			<td class="tr" height="50"><input type="submit" name="submit" value=" 提 交 " class="btn"/>&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value=" 返 回 " class="btn" onclick="history.back(-1);"/></td>
		</tr>
	</table>
</form>
	{if $action=='add'}
	<script type="text/javascript">s('mid_{$mid}');	m('{$action}');</script>
	{else}
	<script type="text/javascript">s('mid_{$mid}');	m('s{$status}');</script>
	{/if}
{else}
<div class="tt">
	<form action="{url('member/my')}">
		<input type="hidden" name="mid" value="{$mid}"/>
		<input type="hidden" name="status" value="{$status}"/>
		&nbsp;{category_select('catid', '不限分类', $catid, $moduleid)}&nbsp;
		<input type="text" size="50" name="kw" value="{$kw}" title="关键词"/>&nbsp;
		<input type="submit" value=" 搜 索 " class="btn"/>
		<input type="button" value=" 重 置 " class="btn" onclick="window.location='{url('member/my')}?mid={$mid}&status={$status}';"/>
	</form>
</div>
<div class="ls">
	<form method="post">
		<table class="data-form">
			<tr>
				<th width="20"><input type="checkbox" onclick="checkall(this.form);"/></th>
				<th>标 题</th>
				<th>分 类</th>
				<th>{if $timetype=='add'}添加{else}更新{/if}时间</th>
				<th>浏览</th>
				<th width="80">管理</th>
			</tr>
			{loop $lists $k $v}
				<tr>
					<td><input type="checkbox" name="itemid[]" value="{$v[itemid]}"/></td>
					<td align="left" title="{$v[alt]}">&nbsp;{if $v[status]==3}<a href="{url($module.'/show', 'itemid='.$v['itemid'])}" target="_blank" class="t">{else}<a href="{url('member/my')}?mid={$mid}&action=edit&itemid={$v[itemid]}" class="t">{/if}{$v[title]}</a>{if $v[status]==1 && $v[note]} <a
							href="javascript:" onclick="alert('{$v[note]}');"><img src="image/why.gif" title="未通过原因"/></a>{/if}</td>
					<td>&nbsp;&nbsp;<a href="{url($module.'/list', 'catid='.$v['catid'])}" target="_blank">{$v[catname]}</a>&nbsp;&nbsp;</td>
					{if $timetype=='add'}
						<td class="f_gray px11" title="更新时间 {$v[editdate]}">{$v[adddate]}</td>
						{else}
						<td class="f_gray px11" title="添加时间 {$v[adddate]}">{$v[editdate]}</td>
					{/if}
					<td class="f_gray px11">{$v[hits]}</td>
					<td>
						<a href="{url('member/my')}?mid={$mid}&action=edit&itemid={$v[itemid]}"><img width="16" height="16" src="image/edit.png" title="修改" alt=""/></a>&nbsp;
						{if $MG[copy]}&nbsp;<a href="{url('member/my')}?mid={$mid}&action=add&itemid={$v[itemid]}&catid={$v[catid]}"><img width="16" height="16" src="image/new.png" title="复制信息" alt=""/></a>{/if}
						{if $MG[delete]}&nbsp;<a href="{url('member/my')}?mid={$mid}&action=delete&itemid={$v[itemid]}" onclick="return confirm('确定要删除吗？此操作将不可撤销');"><img width="16" height="16" src="image/delete.png" title="删除" alt=""/></a>{/if}
					</td>
				</tr>
			{/loop}
		</table>
</div>
	{if $MG[delete] || $timetype!='add'}
	<div class="btns">
		{if $MG[delete]}
			<span class="f_r"><input type="submit" value=" 删除选中 " class="btn" onclick="if(confirm('确定要删除选中{$MOD[name]}吗？')){this.form.action='?mid={$mid}&status={$status}&action=delete'}else{return false;}"/></span>
		{/if}
		{if $timetype!='add'}
			<input type="submit" value=" 刷新选中 " class="btn" onclick="this.form.action='?mid={$mid}&status={$status}&action=refresh';"/>
			{if $MOD[credit_refresh]}
				刷新一条信息一次需消费 <strong class="cred">{$MOD[credit_refresh]}</strong> 积分，当积分不足时将不可刷新
			{/if}
		{/if}
	</div>
	{/if}
</form>
	{if $MG[xdcooper_limit] || (!$MG['fee_mode'] && $MOD[fee_add])}
	<div class="con">
		{if $MG[xdcooper_limit]}
			总共可发 <span class="f_b cred">{$MG[xdcooper_limit]}</span> 条&nbsp;&nbsp;&nbsp;
			当前已发 <span class="f_b">{$limit_used}</span> 条&nbsp;&nbsp;&nbsp;
			还可以发 <span class="f_b f_blue">{$limit_free}</span> 条&nbsp;&nbsp;&nbsp;
		{/if}
		{if !$MG['fee_mode'] && $MOD[fee_add]}
			发布信息收费 <span class="f_b cred">{$MOD[fee_add]}</span> {if $MOD[fee_currency] == 'money'}{$DT[money_unit]}{else}{$DT[credit_unit]}{/if}/条&nbsp;&nbsp;&nbsp;
			可免费发布 <span class="f_b">{if $MG[info_free_limit]<0}无限{else}{$MG[info_free_limit]}{/if}</span> 条&nbsp;&nbsp;&nbsp;
		{/if}
	</div>
	{/if}
<div class="pages">{$pages}</div>
<script type="text/javascript">s('mid_{$mid}');m('s{$status}');</script>
{/if}
{if $action == 'add' || $action == 'edit'}
<script type="text/javascript">
	seajs.use(['$', 'vf', 'vf-css', 'easyui','easyui-css'], function($){
		$('#dform').Validform({
			beforeCheck:function(curform){
				lemon.editor.post_content_.sync();
			}
		});
	})
</script>
{/if}
{template 'footer', 'member'}